package com.igeek.compus.study.product.service.impl;

import com.igeek.compus.study.product.dao.ProductDao;
import com.igeek.compus.study.product.entity.Product;
import com.igeek.compus.study.product.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    ProductDao productDao;

    @Override
    public List<Product> getProductList(Product product) {

        return productDao.getProductList(product);
    }

    @Override
    public int updateProduct(Product product) {
        return productDao.updateProduct(product);
    }

    @Override
    public int deleteProductById(Integer id) {
        return productDao.deleteProductById(id);
    }

    @Override
    public int addProduct(Product product) {
        return productDao.addProduct(product);
    }

    @Override
    public int deleteProductList(List<String> productIds) {
        return productDao.deleteProductList(productIds);
    }
}
